<template>
    <div class="chart" id="fourchart" style="width: 600px;height: 400px;margin: 10px auto;"></div>
</template>

  
<script>
import * as echarts from "echarts";
export default {
  mounted() {
      // 获取容器元素
      const chartContainer = document.getElementById("fourchart");
      // 初始化 ECharts 实例
      const myChart = echarts.init(chartContainer);
       // 设置图表的配置项和数据
      const option = {
        xAxis: {
    type: 'category',
    boundaryGap: false,
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [820, 932, 901, 934, 1290, 1330, 1320],
      type: 'line',
      areaStyle: {}
    }
  ]
};
// 将配置项应用到图表实例上
myChart.setOption(option);
},
  };

</script>
  
<style lang='less'>

</style>
